# from flask import Flask
# from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
# from redis import StrictRedis
# from flask_session import Session
# from config import config_dict
# Session配置中需要用到redis
# import redis
from info import create_app, db
from info import models

# 创建app对象传配置参数? 所有传参都在主文件里比较好?
app = create_app("development")
# 6数据库迁移JSON.stringify(param)
Migrate(app, db)
manage = Manager(app)
# 7添加迁移命令
manage.add_command("db", MigrateCommand)


if __name__ == '__main__':
    # 将app修改为manage
    manage.run()
